package com.shujia.java.day18.demo6;

/**
 * @Description: MyThreadDemo 我必须想让李四运行完
 * @Author: 王火火
 * @Date: 2019/8/20 11:07
 * <p>
 * 1.继承Thread
 * 2.重写run
 * 3.new 对象
 * 4.启动
 * <p>
 * sleep方法加在start前后 是不是run运行完或者没运行就开始睡眠
 */

public class MyThreadDemo extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(getName() + "------------" + i);
        }
    }
}
